home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Hot Mix 17
/
Hot Mix 17.iso
/
HM17_SGI
/
research
/
examples
/
doc
/
surf01
< prev
next >
Wrap
Text File
|
1997-07-08
|
2KB
|
55 lines
; This batch file creates three surface plots used as examples in
; Chapter 11, "Plotting Multi-dimensional Arrays", of _Using IDL_.
; Restore variables elev, X, and Y.
@cntour01
; Resize the original data into a 72 x 92 array, setting all data values
; which are less than 2650 (the lowest elevation we wish to show) to 2650.
surf = REBIN(elev > 2650, 360/5, 460/5)
; Create a window for the first image.
WINDOW, 1, XSIZE=500, YSIZE=350
; Display the surface, drawing a "skirt" down to 2650 meters.
SURFACE, surf, X, Y, SKIRT = 2650, AX=45
; Use the READ procedure to prompt the user to press a key. The
; value stored in the variable 'var' is not used.
var=''
READ, var, $
PROMPT='Press Return to display the SURFACE plot from the reverse angle'
; Display the surface from the "back side" of the data. Note that the
; axes are rotated as well.
WINDOW, 2, XS=500, YS=350
SURFACE, surf, X, Y, SKIRT = 2650, /HORIZONTAL, AZ = 210, AX = 45
READ, var, $
PROMPT='Press Return to display the SURFACE plot with data rotated'
WINDOW, 3, XS=500, YS=350
; Display the "back side" of the data by reversing the range of the axis
; values rather than by rotating the view of the data. This is accomplished
; by reversing the minimum and maximum values of the X and Y ranges, via
; the XRANGE and YRANGE keywords.
SURFACE, surf, X, Y, SKIRT = 2650, /HORIZONTAL, AX = 45,$
YRANGE = [MAX(Y), MIN(Y)], XRANGE=[MAX(X), MIN(X)]
READ, var, $
PROMPT='Press Return delete all three windows'
; Delete the windows.
WDELETE, 1, 2, 3